package com.erlinyou.im.web.controller.base.message;

public enum CallCenterType {
	
	WORLD(2), COUNTRY(3), CUSTOM(4), UNKNOW(0);
	private Integer code;

	CallCenterType(Integer code) {
		this.code = code;
	}
	
	public static CallCenterType valueOfStr(String num) {
		switch (num) {
		case "2":
			return WORLD;
		case "3":
			return COUNTRY;
		case "4":
			return CUSTOM;
		default:
			return UNKNOW;
		}
	}
	
	public static CallCenterType valueOf(int num) {
		switch (num) {
		case 2:
			return WORLD;
		case 3:
			return COUNTRY;
		case 4:
			return CUSTOM;
		default:
			return UNKNOW;
		}
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}
}
